<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>第九十一节课</title>
    <link rel="stylesheet" href="../css/common.css">
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script>

        jQuery.fn.test = function () {
            console.log(this[0].nodeName);//输出当前节点名称
        };

        $(function () {
            $("input").click(function () {
                $(this).test();
            });
            $("#aa").click(function () {
                $(this).test();
            });
        });

    </script>
</head>
<body>
<input type="button" value="jQuery自定义命令测试"/>
<input type="button" value="jQuery自定义命令测试222"/>
<div id="aa">我也可以</div>
</body>
</html>
